const sequelize = require('sequelize');

module.exports = app => {
    const { STRING, INTEGER, BOOLEAN } = app.Sequelize;
    const Role = app.model.define('subCategory', {
        id: { type: sequelize.INTEGER, primaryKey: true, autoIncrement: true },
        name: STRING(1234),
        type: {
            type: INTEGER,
            allowNull: false
        },
        subCategoryId: {
            type: INTEGER,
            allowNull: false
        },
        fatherId: {
            type: INTEGER,
            allowNull: false
        },
        isShow: {
            type: BOOLEAN,
            allowNull: false,
        }
    });

    return Role;
};